<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

<?php

require_once(dirname(__FILE__) . '/../globalConfiguration.php');

class userAuthQueryClass {
    
    private $con=NULL;
    
    function __construct($con) {
        
        $this->con=$con;
        mysql_select_db(MYSQL_DB, $this->con);
    }
    
    public function getUser($username) {
        $getusr=array();
        
        $sql="select * from users where username={$username}";
        
        $result = mysql_query($sql,$this->con);
        //$row=mysql_fetch_array( $result );
        if ($result) {
            while ( ($row = mysql_fetch_assoc($result)) != NULL ) {
                array_push($getusr, $row);
            }
            mysql_free_result($result);
        }
        
        return $getusr;
        
        
    }
}


?>
